<%@ include file="/taglibs.jsp"%>
<jsp:directive.page import="com.winterwar.base.Convention"/>
<jsp:directive.page import="com.winterwar.base.Registration"/>
<jsp:directive.page import="java.text.NumberFormat"/>
<%
	Registration reg = (Registration) request.getAttribute("registration");
	double costOffset = reg.getCostOffset();
	double cost = reg.getCost();
	
	double total = cost - costOffset;
	double toPay = cost - costOffset;
	NumberFormat nf = NumberFormat.getCurrencyInstance();
	
	toPay = toPay + .31;
	toPay = toPay / 0.971;
	toPay = toPay * 100;
	toPay = Math.round(toPay);
	toPay = toPay/100;
%>
<title>Winter War - Thanks for Registering!</title>
<center>
<h2>Thank you for registering with Winter War!<br/>  We look forward to having you at ${conName }!</h2>
</center>
Please take the time to review your registration below, and make sure the information is correct.  If there is an error in your registration, please contact our staff at your earliest convenience to correct the problem.

<hr>
<center>
<table>
	<tr>
		<th>Registrant Name</th> <td colspan="3">${registration.user.firstName } ${registration.user.lastName }</td>
	</tr><tr>
		<th>Address</th> <td colspan="3">${registration.user.address1 }</td>
	</tr><tr>
		<th>City/State/Postal Code</th> <td colspan="3">${registration.user.city }, ${registration.user.state } ${registration.user.zipCode }</td>
	</tr><tr>
		<th>Contact Info</th> <td colspan="3">${registration.user.email } ${registration.user.phoneNumber }</td>
	</tr>
	<tr><td colspan="4"><hr></td></tr>
	<tr>
		<th><bean:message key="registration.type"/>: </th>
		<c:choose>
			<c:when test="${registration.type == '1' }">
				<td>Single Day</td>
				<th><bean:message key="registration.dayRegistered"/>: </th>
				<td>
					<c:choose>
						<c:when test="${registration.dayRegistered == '1' }">Friday</c:when>
						<c:when test="${registration.dayRegistered == '2' }">Saturday</c:when>
						<c:when test="${registration.dayRegistered == '3' }">Sunday</c:when>
					</c:choose>
				</td>
			</c:when>
			<c:when test="${registration.type == 2 }">
				<td colspan="3">Weekend</td>
			</c:when>
			<c:when test="${registration.type == 3 }">
				<td colspan="3">ASL Weekend</td>
			</c:when>
		</c:choose>
	</tr>
	<tr><th>Events Selected:</th></tr>
	<c:forEach var="regEvent" items="${registration.events}">
		<tr>
			<td colspan="4">${regEvent.event.slotName } : ${regEvent.event.eventName}</td>
		</tr>
	</c:forEach>
	<tr><td colspan="4"><hr></td></tr>
	<tr>
		<th>Sub-Total: </th>
		<td colspan="3"><%=nf.format(cost) %></td>
	</tr>
	<tr>
		<th>Judges Discount:</th>
		<td colspan="3"><%=nf.format(costOffset) %></td>
	</tr>
	<tr>
		<th>Amount Owed:</th>
		<td colspan="3"><%=nf.format(total) %></td>
	</tr>
</table>

<form action="https://www.paypal.com/cgi-bin/webscr" method="post">
<input type="hidden" name="cmd" value="_xclick">
<input type="hidden" name="business" value="AL6MWLSAGPQ8G">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" value="Winter War Registration Number: ${registration.regID }">
<input type="hidden" name="amount" value="<%=toPay %>">
<input type="hidden" name="currency_code" value="USD">
<input type="hidden" name="bn" value="PP-BuyNowBF:btn_paynowCC_LG.gif:NonHosted">
<input type="image" src="https://www.paypal.com/en_US/i/btn/btn_paynowCC_LG.gif" border="0" name="submit" alt="">
<img alt="" border="0" src="https://www.paypal.com/en_US/i/scr/pixel.gif" width="1" height="1">
</form>
 
</center>
<hr>
<h2>Payment Options</h2>
For your convenience, Winter War now offers online payment of registration costs! Please note, however, that there will be a small service charge included with your payment to cover the credit card processing charge that Winter War is charged by our payment provider.
<br/>
However, if you do not wish to use PayPal, you can simply print this page, and send it along with a check or money order for the full Total Amount Owed to the following address:<br>
<b>Please make all checks payable to Alan Conrad</b>
<hr>
Donald McKinney<br>
<br>
PO Box 1012<br>
<br>
St. Joseph, IL 61873<br>
<hr>
(Please note: If you do not wish to print this page to mail, make sure that you include your full name and address that you used to register with along with your payment.)
	<center><IMG alt="Our New Logo!" src="http://www.winterwar.org/logo350.jpg" border=0><br></center>
